<?php

namespace app\common\model\mysql;

use think\Model;

class ReimburseType extends Model
{
    // 设置当前模型对应的完整数据表名称
    protected $table = 'acc_reimburse_type';

    /**
     * 查询报销类型列表
     * @param $where
     * @param $field
     * @return mixed
     */
    public function getNormalReimburseTypeList($where, $field){
        $order = [
            "id" =>"asc",
        ];
        $result = $this->where($where)->field($field)->order($order)->select();
        return $result->toArray();
    }

    /**
     * 查询报销类型信息
     * @param $id
     * @param $field
     * @return array
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\DbException
     * @throws \think\db\exception\ModelNotFoundException
     */
    public function getNormalReimburseType($id, $field){
        $where = [
            "id" =>$id,
        ];
        $result = $this->where($where)->field($field)->find();
        return $result->toArray();
    }
}
